<?php
/**
 * @Notes:【】
 * @Date: 2022-06-11 1:40
 */

namespace App\Service\Settings;

use App\Dao\Settings\SettingsTaskRefreshDao;
use App\Dao\Settings\SettingsTaskTopDao;
use Hyperf\Di\Annotation\Inject;

class TaskTopService
{
    /**
     * @Inject()
     * @var SettingsTaskTopDao
     */
    protected $settingsTaskTopDao;

    public function lists()
    {
        return $this->settingsTaskTopDao->lists(_Collect());
    }

    public function add(\App\Tool\Collect $params)
    {
        return $this->settingsTaskTopDao->add($params);
    }

    public function edit(\App\Tool\Collect $params)
    {
        return $this->settingsTaskTopDao->edit($params->get('id'), $params->except('id'));
    }

    public function del(mixed $id)
    {
        return $this->settingsTaskTopDao->del($id);
    }
}